// HTTPS 网络请求封装
function request(url, data, method = "get") {
  return new Promise((resolve, reject) => {
    wx.request({
      url: url,
      method: method,
      data: data,
      header: {},
      success(res) {
        resolve(res);
      },
      fail() {
        reject(res);
      }
    })
  })
};

export { request };
